package com.xyz.dao.logic;

import com.free.ext.mybatis.model.entity.PageResponseModel;
import com.xyz.dao.dao.SSettingDao;
import com.xyz.domain.table.SSetting;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class SSettingLogic {

    @Autowired
    private SSettingDao sSettingDao;

    public SSetting add(SSetting sSetting){
        return sSettingDao.insert(sSetting);
    }

    public Integer update(SSetting sSetting){
        return sSettingDao.update(sSetting);
    }

    public List<SSetting> list(SSetting sSetting, String orderBy){
        return sSettingDao.selectList(sSetting, orderBy);
    }

    public Integer delete(Integer key){
        return sSettingDao.delete(key);
    }

    public PageResponseModel<SSetting> pageInfo(SSetting sSetting, String orderBy, Integer pageNo, Integer pageSize){
        return sSettingDao.selectByPageNo(sSetting, orderBy, pageNo, pageSize);
    }

}